/**
 * 信任登录相关API
 */

import { http, Method } from "@/utils/request.js";
import api from '@/config/api.js';
const request = http.request;


/**
 * 小程序自动登录
 * @param params
 * @data type,可用值:H5,PC,WECHAT_MP,DOUYIN_MP,KUAISHOU_MP,ALIPAY_MP,APP,UNKNOWN
 */
export function mpAutoLogin(params, data) {
  return http.request({
    url: `${api.url}/jiangnan/${data}/getUserId`,
    // url: 'passport/connect/miniProgram/auto-login',
    method: Method.GET,
    params,
  });
}

export function getSmsCode(params){
	return http.request({
	  url: `jiangnan/login/getSmsCode`,
	  method: Method.POST,
	  data:params,
	});
}

export function bindRoom(params){
	return http.request({
	  url: `jiangnan/login/bindRoom`,
	  method: Method.POST,
	  data:params,
	});
}